import React from "react";
import Login from "../page/Login";
import Search from "../page/Search";
import Sign from "../page/Sign";
import Index from "../page/Index";
import My from "../page/My";
import All from "../page/All";




const routes = [


    {
        path: '/search',
        component: Search
    },
    {
        path: '/sign',
        component: Sign
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/newsinfo/:id',
        component: React.lazy(() => import('../page/Newsinfo'))
    },
    {
        path: '/collect',
        component: React.lazy(() => import('../page/Collect.jsx'))
    },
    {
        path: '/',
        component: All,
        routes: [
            {
                path: '/index',
                component: Index
            },
            {
                path: '/my',
                component: My
            },
        ]
    },

]

export default routes